package cn.scw.project.facility.service;

import cn.scw.project.facility.domain.FacFacility;
import cn.scw.project.facility.domain.netework.bean.FacFacilityAddReq;
import cn.scw.project.facility.domain.netework.bean.FacFacilityAutoAddReq;
import cn.scw.project.facility.domain.netework.bean.FacFacilityListReq;
import cn.scw.project.facility.domain.vo.FacFacilityVo;

import java.util.List;

/**
 * 设备Service接口
 *
 * @author api
 * @date 2020-05-20
 */
public interface IFacFacilityService {
    /**
     * 查询设备
     *
     * @param id 设备ID
     * @return 设备
     */
    public FacFacility selectFacFacilityById(Long id);

    public FacFacilityVo selectFacFacilityVoById(Long id);

    FacFacility selectFacFacilityByCode(String facilityCode);

    FacFacilityVo selectFacFacilityVoByCode(String facilityCode);
    /**
     * 查询设备列表
     *
     * @param req 设备
     * @return 设备集合
     */
    public List<FacFacilityVo> selectFacFacilityList(FacFacilityListReq req);

    /**
     * 新增设备
     *
     * @param req 设备
     * @return 结果
     */
    public int insertFacFacility(FacFacilityAddReq req);

    int autoInsertFacFacility(FacFacilityAutoAddReq req);

    void autoUpdateIsExpire();

    /**
     * 修改设备
     *
     * @param req 设备
     * @return 结果
     */
    public int updateFacFacility(FacFacilityAddReq req);

    int updateFacFacility(FacFacility facFacility);

    /**
     * 批量删除设备
     *
     * @param ids 需要删除的设备ID
     * @return 结果
     */
    public int deleteFacFacilityByIds(Long[] ids);

    /**
     * 删除设备信息
     *
     * @param id 设备ID
     * @return 结果
     */
    public int deleteFacFacilityById(Long id);

    boolean existsByCode(String facilityCode);

    int countByUser(Long userId);

    List<FacFacilityVo> queryFacFacilityList(FacFacilityListReq req);

}
